import { get, post } from '../request'

const account = {
    // 获取个人账户信息
    getPersonalAccount(param) {
        return get(
            '/account/personal/info',
            param,
        )
    },

    // 获取商户所有商店账户
    getStoreAccountFromUser(param) {
        return get(
            '/account/store',
            param,
        )
    },

    // 获取商城利润账户
    getWebShopAccount() {
        return get(
            '/account/webshop'
        )
    },

    // 获取商店对应的商店账户
    getAccountOfStore(storeId) {
        return get(
            `/account/store/${storeId}`
        )
    },

    // 个人账户充值
    rechargePersonalAccount(param) {
        return post(
            '/account/personal/recharge',
            param,
        )
    },

    // 商店账户充值
    rechargeStoreAccount(param) {
        return post(
            '/account/store/recharge',
            param,
        )
    },

    // 管理员往商城利润账户充值
    rechargeMallProfitAccount(param) {
        return post(
            '/account/webshop/recharge',
            param
        )
    }
}

export default account;
